/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.unifor.redes1.odirabel.gui.server;

import javax.swing.JPanel;


/**
 *
 * @author pedro
 */
public class Cliente extends JPanel{

    private String login;
    private String ip;

    public Cliente(String login, String ip) {
        this.login = login;
        this.ip = ip;
    }

    /**
     * @return the login
     */
    public String getLogin() {
        return login;
    }

    /**
     * @param login the login to set
     */
    public void setLogin(String login) {
        this.login = login;
    }

    /**
     * @return the ip
     */
    public String getIp() {
        return ip;
    }

    /**
     * @param ip the ip to set
     */
    public void setIp(String ip) {
        this.ip = ip;
    }

    @Override
    public boolean equals(Object arg0) {
        return this.login.equals(((Cliente) arg0).login)||this.ip.equals(((Cliente) arg0).ip);
    }

    @Override
    public String toString() {
        return login+"("+ip+")";
    }


}
